<%--
  @author Tharanga Punchihewa
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<script src="${pageContext.request.contextPath}/js/printer.js" type="text/javascript"></script>
<%--<link rel="stylesheet" href="${pageContext.request.contextPath}/css/printDetailForm.css" media="print"/>--%>

<div id="land-registration-module-home-title" class="module-home-title">
    <s:a href="reportModule.do">
        <span><img src="${pageContext.request.contextPath}/images/print.png" alt="Print">
            <s:label value="%{getText('reports.label')}"/></span>
    </s:a>
    <span class="module-title-breaker"> > </span>
    <s:a href="initAlienationApplicationReport.do">
        <span><img src="${pageContext.request.contextPath}/images/report.png" alt="Land Report">
        <s:label value="%{getText('initial_alienation_application_report.label')}"/></span>
    </s:a>
</div>

<s:include value="../../printCaller.jsp"/>

<div id="printDivId">
    <div id="init-land-report-list">
        <div class="page-title center-align">
            <h2><s:label value="%{getText('initial_land_application_list_report.label')}"/></h2>
        </div>
    </div>
    <div id="alienation-type-outer">
        <s:form action="searchInitApplications.do">
            <table>
                <tr>
                    <td class="width-250-px"><s:label value="%{getText('alienation_methods.label')}"/></td>
                    <td><s:select
                            name="alienationMethod"
                            id="dsDivisionsSelected"
                            list="alienationMethodList"
                            /></td>
                    <td>
                        <s:submit value="%{getText('search.label')}"/>
                    </td>
                </tr>
            </table>
        </s:form>


    </div>
    <div id="land-list">
        <s:if test="landApplicationList != null">
            <s:if test="landApplicationList.size() > 0">
                <%--<div id="printbtn" class="form-button-div right-align">
                    <input type="button" value="Print" onclick="printInitApplicationReportPage();">
                </div>--%>

                <table class="width-100 margin-10-auto table land-table" id="land-application-form-list" border="1"
                       cellpadding="0"
                       cellspacing="0">
                    <thead>
                    <th><s:label value="%{getText('applicant_name.label')}"/></th>
                    <th><s:label value="%{getText('applicant_Address')}"/></th>
                    <th><s:label value="%{getText('submit_date.label')}"/></th>
                    </thead>
                    <s:iterator status="status1" value="landApplicationList">
                        <tr>
                            <td class="center-align"><s:property value="holder.name"/></td>
                            <td class="center-align"><s:property value="holder.contacts.address"/></td>
                            <td class="center-align"><s:property value="submitDate"/></td>
                        </tr>
                    </s:iterator>

                </table>
            </s:if>
        </s:if>


    </div>
</div>